# Contributor: Magnus Sandin <magnus.sandin@gmail.com>
# Maintainer: Magnus Sandin <magnus.sandin@gmail.com>
pkgname=multicast-relay
pkgver=1.3.1
pkgrel=0
pkgdesc="Relay broadcast and multicast packets between interfaces"
options="!check" # No tests available
url="https://github.com/alsmith/multicast-relay"
arch="noarch"
license="GPL-3.0-or-later"
depends="python3 py3-netifaces"
subpackages="$pkgname-doc $pkgname-openrc"
source="$pkgname-$pkgver.tar.gz::https://github.com/alsmith/multicast-relay/archive/refs/tags/v$pkgver.tar.gz
	fix-python_version.patch
	$pkgname.initd
	$pkgname.confd
	"

package() {
	install -m744 -D "$builddir/$pkgname.py"  "$pkgdir/usr/bin/$pkgname.py"
	install -m644 -D "$builddir/README.md" "$pkgdir/usr/share/doc/$pkgname/README.md"
	install -m755 -D "$srcdir"/$pkgname.initd "$pkgdir"/etc/init.d/$pkgname
	install -m644 -D "$srcdir"/$pkgname.confd "$pkgdir"/etc/conf.d/$pkgname
}

sha512sums="934db533345f8a7863765ffb444178dd20ea4208537cfb0fd062dce1902050a43f8476ae737c3cf37e799b4de65398ecebc8e9fc4f0014432bc5922cce5bfa2c  multicast-relay-1.3.1.tar.gz
3a5e9dee4e05c89ae421861aaba4b38195cc6a04b6e7552d5f5b251eaa0f5a6ac12f6c831bf065c7585faad74cf60352fe5eefbe6ccbcec2af6bfe143b31bc1b  fix-python_version.patch
32a6fe5f9072fb708c89d9fa2035b4044fdbd36648c42fa953128f724a1ba371ed2e8c086507fc5b746a0ded2f06f86c02360cd836bdd521c8a90172de63e870  multicast-relay.confd
2a82a4bbc01dfcce4c70a47ddb290499ecb5f43a9b290337632e832622cdd44780ae21c5db01693804f6f6c6bd88d79785dbc66601bce334c51a58022d909603  multicast-relay.initd
"
